<template>
  <div>
    <mt-header title="PC" style="position: fixed;">
      <router-link to="/" slot="left">
        <mt-button icon="back" @click="goBack">返回</mt-button>
      </router-link>
    </mt-header>
    <router-view style=" margin-top:40px"></router-view>
    <mt-tabbar v-model="selected" value="" style="position: fixed">
      <mt-tab-item id="0" @click.native="publish">
        <img slot="icon" src="./static/images/tabbar/index.png">
        查看代理
      </mt-tab-item>

      <mt-tab-item id="1" @click.native="userInfo">
        <img slot="icon" src="./static/images/tabbar/index.png">
        上传照片
      </mt-tab-item>
    </mt-tabbar>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        selected:'1'
      }
    },
    computed:{
      changeSelected(){
          console.log(this.selected)
        }
    },
    methods: {
      goBack () {
        window.history.length > 1
          ? this.$router.go(-1)
          : this.$router.push('/')
      },
      publish(){
        this.$router.push("/home")
      },
      userInfo(){
        this.$router.push("/upload")
      }
    }
  }
</script>

<style scoped>

</style>
